package com.jt.tenant.activity;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.jt.tenant.R;
import com.jt.tenant.app.JTApplication;
import com.jt.tenant.widget.GuideView;
import com.zcx.helper.pager.Guide;

/**
 * Created by Administrator on 2016/1/30.
 */
public class GuideActivity extends JTActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_guide);

        GuideView guideView = (GuideView) findViewById(R.id.guide_guide_view);

        guideView.addLayoutId(R.layout.guide_one, R.layout.guide_two, R.layout.guide_three);

        View view = LayoutInflater.from(this).inflate(R.layout.guide_one,null);

        guideView.setOnEndListener(R.id.tv_go, new Guide.OnEndListener() {

            @Override
            public void onEnd() {

                JTApplication.jtPreferences.saveIsGuide(true);
                finish();
                startVerifyActivity(JTApplication.jtPreferences.readHaveUid() ? MainActivity.class : LoginActivity.class);



            }

        });

    }

}
